<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>CURLOPT_HTTPAUTH man page</title>
<meta name="generator" content="roffit">
<STYLE type="text/css">
pre {
  overflow: auto;
  margin: 0;
}

P.level0, pre.level0 {
 padding-left: 2em;
}

P.level1, pre.level1 {
 padding-left: 4em;
}

P.level2, pre.level2 {
 padding-left: 6em;
}

span.emphasis {
 font-style: italic;
}

span.bold {
 font-weight: bold;
}

span.manpage {
 font-weight: bold;
}

h2.nroffsh {
 background-color: #e0e0e0;
}

span.nroffip {
 font-weight: bold;
 font-size: 120%;
 font-family: monospace;
}

p.roffit {
 text-align: center;
 font-size: 80%;
}
</STYLE>
</head><body>

<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
<p class="level0">CURLOPT_HTTPAUTH - set HTTP server authentication methods to try <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
<p class="level0"><pre class="level0">
&#35;include &lt;curl/curl.h&gt;
&nbsp;
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPAUTH, long bitmask);
</pre>
<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
<p class="level0">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use speaking to the remote server. 
<p class="level0">The available bits are listed below. If more than one bit is set, libcurl will first query the site to see which authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a Class="emphasis" href="./CURLOPT_USERPWD.html">CURLOPT_USERPWD</a> option or with the <a Class="emphasis" href="./CURLOPT_USERNAME.html">CURLOPT_USERNAME</a> and the <a Class="emphasis" href="./CURLOPT_PASSWORD.html">CURLOPT_PASSWORD</a> options. 
<p class="level0">For authentication with a proxy, see <a Class="emphasis" href="./CURLOPT_PROXYAUTH.html">CURLOPT_PROXYAUTH</a>. 
<p class="level0">
<p class="level0"><a name="CURLAUTHBASIC"></a><span class="nroffip">CURLAUTH_BASIC</span> 
<p class="level1">HTTP Basic authentication. This is the default choice, and the only method that is in wide-spread use and supported virtually everywhere. This sends the user name and password over the network in plain text, easily captured by others. 
<p class="level0"><a name="CURLAUTHDIGEST"></a><span class="nroffip">CURLAUTH_DIGEST</span> 
<p class="level1">HTTP Digest authentication.  Digest authentication is defined in <a href="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617</a> and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. 
<p class="level0"><a name="CURLAUTHDIGESTIE"></a><span class="nroffip">CURLAUTH_DIGEST_IE</span> 
<p class="level1">HTTP Digest authentication with an IE flavor.  Digest authentication is defined in <a href="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617</a> and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. The IE flavor is simply that libcurl will use a special "quirk" that IE is known to have used before version 7 and that some servers require the client to use. 
<p class="level0"><a name="CURLAUTHNEGOTIATE"></a><span class="nroffip">CURLAUTH_NEGOTIATE</span> 
<p class="level1">HTTP Negotiate (SPNEGO) authentication. Negotiate authentication is defined in <a href="http://www.ietf.org/rfc/rfc4559.txt">RFC 4559</a> and is the most secure way to perform authentication over HTTP. 
<p class="level1">You need to build libcurl with a suitable GSS-API library or SSPI on Windows for this to work. 
<p class="level0"><a name="CURLAUTHNTLM"></a><span class="nroffip">CURLAUTH_NTLM</span> 
<p class="level1">HTTP NTLM authentication. A proprietary protocol invented and used by Microsoft. It uses a challenge-response and hash concept similar to Digest, to prevent the password from being eavesdropped. 
<p class="level1">You need to build libcurl with either OpenSSL, GnuTLS or NSS support for this option to work, or build libcurl on Windows with SSPI support. 
<p class="level0"><a name="CURLAUTHNTLMWB"></a><span class="nroffip">CURLAUTH_NTLM_WB</span> 
<p class="level1">NTLM delegating to winbind helper. Authentication is performed by a separate binary application that is executed when needed. The name of the application is specified at compile time but is typically /usr/bin/ntlm_auth 
<p class="level1">Note that libcurl will fork when necessary to run the winbind application and kill it when complete, calling waitpid() to await its exit when done. On POSIX operating systems, killing the process will cause a SIGCHLD signal to be raised (regardless of whether <a Class="emphasis" href="./CURLOPT_NOSIGNAL.html">CURLOPT_NOSIGNAL</a> is set), which must be handled intelligently by the application. In particular, the application must not unconditionally call wait() in its SIGCHLD signal handler to avoid being subject to a race condition.  This behavior is subject to change in future versions of libcurl. 
<p class="level0"><a name="CURLAUTHANY"></a><span class="nroffip">CURLAUTH_ANY</span> 
<p class="level1">This is a convenience macro that sets all bits and thus makes libcurl pick any it finds suitable. libcurl will automatically select the one it finds most secure. 
<p class="level0"><a name="CURLAUTHANYSAFE"></a><span class="nroffip">CURLAUTH_ANYSAFE</span> 
<p class="level1">This is a convenience macro that sets all bits except Basic and thus makes libcurl pick any it finds suitable. libcurl will automatically select the one it finds most secure. 
<p class="level0"><a name="CURLAUTHONLY"></a><span class="nroffip">CURLAUTH_ONLY</span> 
<p class="level1">This is a meta symbol. OR this value together with a single specific auth value to force libcurl to probe for un-restricted auth and if not, only that single auth algorithm is acceptable. <a name="DEFAULT"></a><h2 class="nroffsh">DEFAULT</h2>
<p class="level0">CURLAUTH_BASIC <a name="PROTOCOLS"></a><h2 class="nroffsh">PROTOCOLS</h2>
<p class="level0">HTTP <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
<p class="level0">TODO <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
<p class="level0">Option Added in 7.10.6. 
<p class="level0">CURLAUTH_DIGEST_IE was added added in 7.19.3 
<p class="level0">CURLAUTH_ONLY was added in 7.21.3 
<p class="level0">CURLAUTH_NTLM_WB was added in 7.22.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
<p class="level0">Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication methods. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
<p class="level0"><a Class="manpage" href="./CURLOPT_PROXYAUTH.html">CURLOPT_PROXYAUTH</a>, <a Class="manpage" href="./CURLOPT_USERPWD.html">CURLOPT_USERPWD</a><p class="roffit">
 This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
</body></html>
